package cn.itcast.www.genericTest;

import java.lang.reflect.Method;
import java.lang.reflect.TypeVariable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class MyClass<T> {
	protected List<T> stringList;

	public List<T> getStringList(T obj) {
		return stringList ;
	}
	//通过TypeVariable<Method>[] tv = method.getTypeParameters();可以获取T
	public <T> T method1(T obj) {
		return obj;
	}

	public void method2(Collection<?> obj) {

	}
	
	public <T> void method3(T[] obj) {

	}
	//通过TypeVariable<Method>[] tv = method.getTypeParameters();可以获取E
	public static <E,A extends Throwable> E method4(String[] p1, E[] p2, ArrayList<E>[] p3, E[][] p4) throws A {
		return null;
	}
}
